package common.jdbc.sql.impl;


import common.jdbc.sql.DBType;
import common.jdbc.sql.SqlAdapter;

/**
 * @作者： caopengfei
 * @时间： 2020/9/7
 */
public class GreenplumAdaper extends SqlAdapter {

    @Override
    public String getDriverClass() {
        return "org.postgresql.Driver";
    }

    @Override
    public String getTestSql() {
        return "SELECT 1";
    }

    @Override
    public String getUrl(String ip, String port, String dbName) {
        return "jdbc:postgresql://"+ip+":"+port+"/"+dbName;
    }

    @Override
    public String getDate(String date) {
        return "'"+date+"'";
    }

    @Override
    public String getLength(String zdm, String zdcd) {
        return null;
    }

    @Override
    public String getNotLength(String zdm, String zdcd) {
        return null;
    }

    @Override
    public String getDbtype() {
        return DBType.GREENPLUM.dbName();
    }


}
